# 15.3.5 设置样式
import matplotlib.pyplot as plt
from random_walk import RandomWalk
# 给点着色
while True:
    rw = RandomWalk()
    rw.fill_walk()

    plt.style.use('classic')
    fig, ax = plt.subplots()
    point_numbers = range(rw.num_points)
    ax.scatter(rw.x_values,
               rw.y_values,
               c=point_numbers,
               cmap=plt.cm.coolwarm,
               edgecolors='none',
               s=10)
    plt.show()

    keep_running = input("Make another walk? (y/n): ")
    if keep_running == 'n':
        break
